I'm trying to add multiple templates to a module vai DXL. If I add two templates of different names this is fine e.g.
Template tDemoHead = template "Scope of Module" <>
instance tDemoHead If I add a third template of a type already used, this causes DOORS to freeze and crash (without a message) e.g.
instance tDemoHead peteduk - Fri Sep 27 06:55:20 EDT 2013 |
Re: multiple templates Wow, never seen Templates before. Quick testing shows:
So when considering using two "instance" commands for the same "Template"; take that Doctor's advise from the joke "Don't do that".
|
Re: multiple templates llandale - Fri Sep 27 12:18:58 EDT 2013 Wow, never seen Templates before. Quick testing shows:
So when considering using two "instance" commands for the same "Template"; take that Doctor's advise from the joke "Don't do that".
Hi llandale Thanks for the response - but why does the second instance call cause problems. From testing I can create as many templates as I like providing they have a different name - surely DOORS which is object orientated can create more than one instance of a particular object. Is it possible to create a Template dynamically in code, changing it's name each time, then instantiate it? |
Re: multiple templates peteduk - Mon Sep 30 02:02:29 EDT 2013 Hi llandale Thanks for the response - but why does the second instance call cause problems. From testing I can create as many templates as I like providing they have a different name - surely DOORS which is object orientated can create more than one instance of a particular object. Is it possible to create a Template dynamically in code, changing it's name each time, then instantiate it? I've never used them; but it sure appears to me that the "Template" unit created when you do this: Template t = template("whatever") gets used up when you issue the "instance" command. My best guess is that the "template" and "instance" commands need to be paired exactly. It's like ... well, "preparing" a dinner and then "eating" it. Once you eat it you must prepare a new one. -Louie |
Re: multiple templates peteduk - Mon Sep 30 02:02:29 EDT 2013 Hi llandale Thanks for the response - but why does the second instance call cause problems. From testing I can create as many templates as I like providing they have a different name - surely DOORS which is object orientated can create more than one instance of a particular object. Is it possible to create a Template dynamically in code, changing it's name each time, then instantiate it? I think you should raise a PMR with support to see if this is either a defect or at the very least, a doc defect. But for a workaround, how about putting it in a loop to run as many times as you want?...
Template tDemoHead = template "Scope of Module" <>
instance tDemoHead
instance tDemoTest |